/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javalens.maths;

import javalens.apachemaths.ApacheMathWrapper;
import javalens.rwrapper.REngineWrapper;

/**
 *
 * @author vermaak
 */
public class MathsEngineFactory {

    static public Maths getMathsEngine(MathsEngineEnum mathsEngine) {
        if (mathsEngine.equals(MathsEngineEnum.R)) {
            return REngineWrapper.getREngineWrapper();
        } else if (mathsEngine.equals(MathsEngineEnum.APACHE)) {
            return ApacheMathWrapper.getApacheMathWrapper();
        }
        throw new RuntimeException("Unknown maths engine specified. Currently R and Apache are implemented");
    }
}
